<?$fecha = date("d")."-".date("m")."-".date("Y");
include ("../conectarse.php");


$apellido = $_POST['apellido'];
$nombre = $_POST['nombre'];
$tipodoc = $_POST['tipodoc'];
$nrodoc = $_POST['nrodoc'];//30
$cuil = $_POST['cuil'];
$civil = $_POST['civil'];
$sexo = $_POST['sexo'];
$apellidomaterno = $_POST['apellidomaterno'];
$nacdia = $_POST['nacdia'];
$nacmes = $_POST['nacmes'];
$nacano = $_POST['nacano'];
$nacionalidad = $_POST['nacionalidad'];
$calle = $_POST['calle'];
$altura = $_POST['altura'];//20
$departamento = $_POST['departamento'];
$piso = $_POST['piso'];
$localidad = $_POST['localidad'];
$provincia = $_POST['provincia'];
$partido = $_POST['partido'];
$telefono = $_POST['telefono'];
$celular = $_POST['celular'];
$codigopostal = $_POST['codigopostal'];
$reparticion = $_POST['reparticion'];
$lugartrabajo = $_POST['lugartrabajo'];
$domiciliolaboral = $_POST['domiciliolaboral'];
$localidadlaboral = $_POST['localidadlaboral'];
$telefonolaboral = $_POST['telefonolaboral'];
$interno = $_POST['interno'];
$codigopostal2 = $_POST['codigopostal2'];
$apellidoreferencia = $_POST['apellidoreferencia'];
$nombrereferencia = $_POST['nombrereferencia'];
$vinculoreferencia = $_POST['vinculoreferencia'];
$fijoreferencia = $_POST['fijoreferencia'];
$inversion = $_POST['inversion'];
$interes = $_POST['interes'];
$matricula = $_POST['matricula'];
$descuento = $_POST['descuento'];
$cuit = $_POST['cuit'];
?>
<body bgcolor = "#005F8C" alink = "white" vlink = "white" link = "white" text = "white">
<table width  ="100%" height = "100%" cellpadding = "0" cellspacing = "0">

<tr valign = "top">

<td align = "center">

<!--BARRA                    -->

<?include ("./barra/barramutual.php");?>

<!-- FIN DE LA BARRA                    -->
</td>


</tr>


<tr valign = "top" height = "100%"><td align = "left">

<!-- CUERPO DEL SISTEMA -->
<table cellpadding = "0" cellspacing = "0" border  ="0" height = "100%">
<tr valign = "middle"><td bgcolor = "black">


<?include ("links.php");?>



<!-- FIN DEL CUERPO DEL SISTEMA -->








</td><form method = "POST"><td width = "100%" ALIGN = "CENTER"><br>

<table height = "100%"><TR valign="top"><TD>
<table border ="2" cellspacing = "0" cellpadding = "0" bordercolor = "white">
<tr><td>




        <table><tr><td colspan  ="4"></td></tr>

  <tr><td colspan  = "4" align="center"><b>MUTUAL</td></tr>
  
  <tr><td colspan  = "4"><hr></td></tr>
        <tr>
        <td>Nombre:</td>
        <td><input type = "text" name = "nombre" value = "<?echo $nombre;?>"></td>
        <td>Matricula INAES:</td>
        <td><input type = "text" name = "matricula" value = "<?echo $matricula;?>"></td>
        </tr>


        <tr>
      
        <td>Codigo de Descuento:</td>
        <td><input type = "text" name = "descuento" value = "<?echo $descuento;?>"></td>
        <td>Cuit:</td>
        <td><input type = "text" name = "cuit" value = "<?echo $cuit;?>"></td>
        </tr>


                <tr><td colspan  ="4"><hr></td></tr>
  <tr><td colspan  = "4" align="center"><b>Detalles</td></tr>
                <tr><td colspan  ="4"><hr></td></tr>

 <tr>
        <td>Provincia:</td>
        <td>

<select name = "provincia" onchange="this.form.submit()">

<option = ""></option>


<?$busquedaprov = "select * from provincias order by nombre Asc";
$resultadoprov = mysql_query($busquedaprov);
while($filaprov=mysql_fetch_array($resultadoprov)){?>


<option value = "<?echo $filaprov['0']?>" <?if($filaprov['0']==$provincia){echo "selected";}?>><?echo $filaprov['nombre']?></option>

<?}?>

</select>


</td>
        <td>Partido:</td>
        <td>

<select name = "partido" onchange="this.form.submit()">

<option = ""></option>


<?$busquedapar = "select * from departamentos where provincia_id = $provincia order by nombre Asc";
$resultadopar = mysql_query($busquedapar);
while($filapar=mysql_fetch_array($resultadopar)){?>


<option value = "<?echo $filapar['0']?>" <?if($filapar['0']==$partido){echo "selected";}?>><?echo $filapar['nombre']?></option>

<?}?>

</select>

</td>
        </tr>

  <tr>
        <td>Localidad:</td>
        <td>




<select name = "localidad" onchange="this.form.submit()">

<option = ""></option>


<?$busquedalocal = "select * from localidades where departamento_id = $partido order by nombre Asc";
$resultadolocal = mysql_query($busquedalocal);
while($filalocal=mysql_fetch_array($resultadolocal)){?>


<option value = "<?echo $filalocal['0']?>" <?if($filalocal['0']==$localidad){echo "selected";}?>><?echo $filalocal['nombre']?></option>

<?}?>
<?if($partido=="575"){?><option value =  "5440" selected>CAPITAL FEDERAL</option><?}?>
</select>





</td></form><form action  = "nuevamutual2.php" method = "POST">
        <td>Calle:</td>
        <td><input type = "text" name = "calle" value = "<?echo $calle;?>"></td>
        </tr>

         <tr>
        <td>Altura:</td>
        <td><input type = "text" name = "altura" value = "<?echo $altura;?>"></td>
        <td>Piso:</td>
        <td><input type = "text" name = "piso" value = "<?echo $piso;?>"></td>
        </tr>


        <tr>
        <td>Dto:</td>
        <td><input type = "text" name = "departamento" value = "<?echo $departamento;?>"></td>
        <td>Codigo Postal:</td>
        <td><input type = "text" name = "codigopostal" value = "<?echo $codigopostal;?>"></td>
        </tr>

 <tr>
        <td>Telefono:</td>
        <td><input type = "text" name = "telefono" value = "<?echo $telefono;?>"></td>
        <td>Correo:</td>
        <td><input type = "text" name = "correo" value = "<?echo $correo;?>"></td>
        </tr>


   
                <tr><td colspan  ="4"><hr></td></tr>
  <tr><td colspan  = "4" align="center"><b>Responsable</td></tr>
                <tr><td colspan  ="4"><hr></td></tr>

 <tr>
        <td>Nombre:</td>
        <td><input type = "text" name = "nombreresponsable" value = "<?echo $nombreresponsable;?>"></td>
        <td>Apellido:</td>
        <td><input type = "text" name = "apellidoresponsable" value = "<?echo $apellidoresponsable;?>"></td>
        </tr>
 <tr>
        <td>Cargo:</td>
        <td><input type = "text" name = "cargoresponsable" value = "<?echo $cargoresponsable;?>"></td>
        <td>Cuit:</td>
        <td><input type = "text" name = "cuitresponsable" value = "<?echo $cuitresponsable;?>"></td>
        </tr>



                <tr><td colspan  ="4"><hr></td></tr>


<input type = "hidden" name = "nombre" value = "<?echo $nombre;?>">
<input type = "hidden" name = "matricula" value = "<?echo $matricula;?>">
<input type = "hidden" name = "cuit" value = "<?echo $cuit;?>">
<input type = "hidden" name = "descuento" value = "<?echo $descuento;?>">
<input type = "hidden" name = "nacano" value = "<?echo $nacano;?>">
<input type = "hidden" name = "tipodoc" value = "<?echo $tipodoc;?>">
<input type = "hidden" name = "nrodoc" value = "<?echo $nrodoc;?>">

<input type = "hidden" name = "provincia" value = "<?echo $provincia;?>">
<input type = "hidden" name = "partido" value = "<?echo $partido;?>">
<input type = "hidden" name = "localidad" value = "<?echo $localidad;?>">
<?if($calle!=""){?>
<input type = "text" name = "calle" value = "<?echo $calle;?>">
<?}if($altura!=""){?>
<input type = "text" name = "altura" value = "<?echo $altura;?>">
<?}if($piso!=""){?>
<input type = "text" name = "piso" value = "<?echo $piso;?>">
<?}if($departamento!=""){?>
<input type = "text" name = "departamento" value = "<?echo $departamento;?>">
<?}if($codigopostal!=""){?>
<input type = "text" name = "codigopostal" value = "<?echo $codigopostal;?>">
<?}if($telefono!=""){?>
<input type = "text" name = "telefono" value = "<?echo $telefono;?>">
<?}if($celular!=""){?>
<input type = "text" name = "celular" value = "<?echo $celular;?>">
<?}?>















































  <tr><td colspan  = "4" align = "right"><input type = "submit" value = "Aceptar"></td></tr>









</form></tr></table>












</TD></TR></table>




















</td></tr></table>




























</td>
</td></tr>

</table>
